const io = require('./io')
const express = require('express')
const app = express()
const server = require('http').createServer(app)
const { getNetworkIPv4 } = require('./utils')
app.use('/', express.static('dist'))
const PORT = 3000
io.attach(server)
// 启动服务器
server.listen(PORT, () => {
  const address = getNetworkIPv4().address
  console.info('- Local:   http://localhost:' + PORT)
  console.info(`- Network: http://${address}:` + PORT)
})
